//
//  Common.h
//  Local
//
//  Created by 刘铎 on 13-12-3.
//  Copyright (c) 2013年 上海即略网络信息科技有限公司. All rights reserved.
//

#import <Foundation/Foundation.h>
#pragma mark - 全局头文件包含
#import "AppDelegate.h"



#pragma mark - 服务器配置




//获取短息以及正式的接口
#define SERVER_ADDRESS @"http://app.sgone.cn/appapi_v4/wholesaler_common/"
//商户正式私密接口
#define SERVER_ADDRESS2 @"http://app.sgone.cn/appapi_v4/wholesaler_security/"

//图片上传到七牛服务器接口(测试接口)
//#define QiNiuSERVER_ADDRESS @"http://app-test.sgone.cn/appapi_v4/shop_common/"
//水果圈新的接口
#define  SERVER_ADDRESS3 @"http://app.sgone.cn/api/webapi/ap_common/"




#define ViewHeight  CGRectGetHeight([[UIScreen mainScreen]bounds])
#define ViewWidth   CGRectGetWidth([[UIScreen mainScreen]bounds])
#define FDLaOt 320.0*ViewWidth

//设置提示toast
#define KEYWINDOW [UIApplication sharedApplication].keyWindow

//自定义单列储存的手机号判断
#define isNoLogin (!dataHandler.phone || dataHandler.phone.length == 0)

//设置字体
#define Font(F) [UIFont systemFontOfSize:(F)]



//高德地图的密钥
#define gaodeSecrect @"b00772f7fe361e6f0c2add4be4b595cc"

//高德地图测试密钥
#define gaodeSecrect2 @"0604a4279e770d92e37f1e3d1776854f"


//友盟统计组件APIKey
#define youmengSecrect @"566abd04e0f55aadbf003894"


//设置本项目中红色
#define BenSe_COLOR [UIColor colorWithRed:238.00/255.00 green:72.00/255.00 blue:38.00/255.00 alpha:1]
//自定义背景2
#define BACKGROUND1 [UIColor colorWithRed:239.0/255 green:239.0/255 blue:244.0/255 alpha:1]


//自定义背景1
#define BACKGROUND2  [UIColor colorWithRed:242.0/255 green:232.0/255 blue:222.0/255 alpha:1]

//自定义条的颜色灰色
#define TiaoColor  [UIColor colorWithRed:182.0/255 green:162.0/255 blue:127.0/255 alpha:1]






#define FDFont_COLOR   FDColorAla(51, 51, 51, 1)
#define FDGFont_COLOR   FDColorAla(153, 153, 153, 1)
#define FDMFont_COLOR   FDColorAla(102, 102, 102, 1)
#define FDUSERNAME_COLOR   FDColorAla(18, 86, 136, 1)
#define FDMainColorAla   FDColorAla(238, 72, 38, 1)
#define FDLine_COLOR   FDColorAla(223, 223, 223, 1)
#define FDColorAla(r, g, b, a)   [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
#define FDBack_COLOR   FDColorAla(246, 246, 246, 1)
#define kAlNum @"0123456789."

#define checkNull(__X__)        (__X__) == [NSNull null] || (__X__) == nil ? @"" : [NSString stringWithFormat:@"%@", (__X__)]


#define FDBCellColor [UIColor colorWithRed:255.0/255.0 green:118.0/255.0 blue:90.0/255.0 alpha:1]



/**
 检查系统版本
 */
#define IOS_VERSION [[[UIDevice currentDevice] systemVersion] floatValue]


//md5加密
NSString *md5(NSString *string); // md5



//账号异地登录操作提示
void yidi();



